﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Reflection.PortableExecutable;
using System.Text;
using System.Threading.Tasks;

namespace GuanYijia.DoMain
{
    /// <summary>
    /// 销售订单
    /// </summary>
    public class Sales_Orders
    {
        [Key]
        //主键
        public int salesOrdersid { get; set; }
        //客户主键
        public int? SupplierId { get; set; }
        //销售员
        public int SalesId { get; set; }
        //商品id
        public int? productid { get; set; }

        //单据主表Id
        public int? documentsid { get; set; }
        //账目信息Id
        public int? AccountId { get; set; }
        //仓库Id
        public int? depot_id { get; set; }

        //单据编号
        [StringLength(200)]
        public string?  Documentnumber { get; set; }
        //单据时间
        public DateTime?  DocumentTime { get; set; }
        //数量
        public int? number { get; set; }
        //其它费用
        [Column(TypeName = "decimal(9,2)")]
        public decimal?  otherfees { get; set; }
        //本次退款
        [Column(TypeName = "decimal(9,2)")]
        public decimal?  refund { get; set; }
        //本次欠款
        [Column(TypeName = "decimal(9,2)")]
        public decimal? debt { get; set; }
        //收取定金
        [Column(TypeName = "decimal(9,2)")]
        public decimal?  deposit { get; set; }
        //收款优惠
        [Column(TypeName = "decimal(9,2)")]
        public decimal? Payoutoffers { get; set; }
        //本次收款
        [Column(TypeName = "decimal(9,2)")]
        public decimal? Collection { get; set; }
        //关联单据
        [StringLength(200)]
        public string ? Associateddocuments { get; set; }
        //退款优惠
        [Column(TypeName = "decimal(9,2)")]
        public decimal? Refundoffers { get; set; }
        //待退金额
        [Column(TypeName = "decimal(9,2)")]
        public decimal? Refundamount { get; set; }
        //待收金额
        [Column(TypeName = "decimal(9,2)")]
        public decimal? Chargeamount { get; set; }
        //扣除订金
        [Column(TypeName = "decimal(9,2)")]
        public decimal?  Deductdeposit { get; set; }
        //采购进度(采购状态:0未采购、2完成采购、3部分采购)
        public bool? purchase_status { get; set; }= false;
        //含税合计
        [Column(TypeName = "decimal(9,2)")]
        public decimal? taxtotal { get; set; }
        //税率
        [Column(TypeName = "decimal(9,2)")]
        public decimal? rate { get; set; }
        //税额
        [Column(TypeName = "decimal(9,2)")]
        public decimal ? tax { get; set; }
        //价税合计
        [Column(TypeName = "decimal(9,2)")]
        public decimal ? prices_total { get; set; }


        //删除标识
        public bool IsDeleted { get; set; } = false;




    }
}
